﻿<%@ Page Title="角色维护" Language="C#" MasterPageFile="~/Master/Win.master" AutoEventWireup="true" CodeBehind="RoleAdd.aspx.cs" Inherits="Runda.EShop.SaaS.SysManage.RoleAdd" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHeader" runat="server">
<script type="text/javascript">
    function CheckForm() {
        if ($('#<%=txtRoleName.ClientID %>').val() == '') { 
            return false;
        }
    }

    function OnTreeNodeChecked() {
        var ele = event.srcElement;
        if (ele.type == 'checkbox') {
            var childrenDivID = ele.id.replace('CheckBox', 'Nodes');
            var div = document.getElementById(childrenDivID);
            if (div == null) return;
            var checkBoxs = div.getElementsByTagName('INPUT');
            for (var i = 0; i < checkBoxs.length; i++) {
                if (checkBoxs[i].type == 'checkbox')
                    checkBoxs[i].checked = ele.checked;
            }
        }
    }
  </script>
</asp:Content> 
<asp:Content ID="Content3" ContentPlaceHolderID="cphMain" runat="server">
    <table cellspacing="3" cellpadding="3" width="100%" class="i_center_table11">
        <tr>
            <td>
                角色名称
            </td>
            <td>
                <asp:TextBox ID="txtRoleName" runat="server" CssClass="input"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                描述
            </td>
            <td>
                <asp:TextBox ID="txtRoleDesc" runat="server" Height="80px" TextMode="MultiLine"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td valign="top">
                权限
            </td>
            <td align="left">
                <asp:TreeView ID="treeFunction" runat="server" ShowCheckBoxes="All" ShowLines="True"
                    PopulateNodesFromClient="False">
                </asp:TreeView>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:Button ID="btnSave" runat="server" Text="保存" OnClientClick="return CheckForm();"
                    OnClick="btnSave_Click" />
                <input id="btnClose" type="button" value="关闭" class="button" onclick="parent.$.ligerDialog.hide();" />
            </td>
        </tr>
    </table>
</asp:Content>
